package com.jsnu.xiaochi.pojo;

import java.util.HashSet;
import java.util.Set;

public class User {
    private String username;

    private String password;

    private String telphone;

    private String img;

    private String sex;

    private String address;

    private String salt;

    private Set<String> roles=new HashSet<>();

    private Set<String> perms=new HashSet<>();

    public User(String username, String password, String telphone, String img, String sex, String address, String salt) {
        this.username = username;
        this.password = password;
        this.telphone = telphone;
        this.img = img;
        this.sex = sex;
        this.address = address;
        this.salt = salt;
    }

    public User() {
        super();
    }

    public Set<String> getRoles() {
        return roles;
    }

    public void setRoles(Set<String> roles) {
        this.roles = roles;
    }

    public Set<String> getPerms() {
        return perms;
    }

    public void setPerms(Set<String> perms) {
        this.perms = perms;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getTelphone() {
        return telphone;
    }

    public void setTelphone(String telphone) {
        this.telphone = telphone == null ? null : telphone.trim();
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img == null ? null : img.trim();
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex == null ? null : sex.trim();
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt == null ? null : salt.trim();
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", telphone='" + telphone + '\'' +
                ", img='" + img + '\'' +
                ", sex='" + sex + '\'' +
                ", address='" + address + '\'' +
                ", salt='" + salt + '\'' +
                ", roles=" + roles +
                ", perms=" + perms +
                '}';
    }
}